#!/bin/bash

  pkill="pkill -9 gunicorn"
  START_CMD1="nohup gunicorn -w 9 --threads 9 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:1481 apps.main:app >/dev/null 2>&1 &"
  START_CMD2="nohup gunicorn -w 9 --threads 9 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:1482 apps.main:app >/dev/null 2>&1 &"
  START_CMD3="nohup gunicorn -w 9 --threads 9 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:1483 apps.main:app >/dev/null 2>&1 &"
  START_CMD4="nohup gunicorn -w 9 --threads 9 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:1484 apps.main:app >/dev/null 2>&1 &"
  eval $pkill
  eval $START_CMD1
  eval $START_CMD2
  eval $START_CMD3
  eval $START_CMD4

#sh go_gunicorn.sh
#nohup sh restart.sh >/dev/null 2>&1 &